﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MINERP.MODEL.FoundationModel;
using MINERP.DisjoinProForOutShop.Forms;
using System.Drawing;
using MINERP.MODEL.OverOrder;
using MINERP.MODEL.DisjoinProForOutShop;

namespace MINERP.DisjoinProForOutShop.IView
{
    public  interface IFrmMain
    {
        #region 属性       

        List<OverOrderView> ShopSelectItems { get; }//得到要打印帐单的被选中的产品

        List<OverOrderView> OutSelectItems { get; }//得到要委外并打印委外单的产品
        List<OverOrderView> ShopInGrid { get; set; }//商户在格子中的产品

        /// <summary>
        /// 当前操作员
        /// </summary>
        int OperateUserId { get; set; }  
    
        /// <summary>
        /// 产品条码
        /// </summary>
        string ProductBarCode { get; set; }

        /// <summary>
        /// 当前分区
        /// </summary>
        GridSubArea_Info CurrShopSubares { get; set; }
        GridSubArea_Info CurrOutShopSubares { get; set; }
        /// <summary>
        /// 当前格子
        /// </summary>
        Grid_Info CurrentGrid { get; set; }
        /// <summary>
        /// old格子
        /// </summary>
        Dictionary<int,Color> OldGridColor { get; set; }
        /// <summary>
        /// 详细列表是否显示
        /// </summary>
        //bool DetailIsExplan { get; set; }

        /// <summary>
        /// 结点ID
        /// </summary>
        int TechId { get; set; }

        int ShowType { get; set; }//0：二种格子都显示，1：委外商分堆格子，2：商户分堆格子

        bool GetIsForcePrint { get; }//得到是否有权限强制打印余额不足的帐单

        bool IsPrintFahuo { get; set; }

        Hashtable hashGrid { get; set; }

        WorkShop_Info WorkShopParas { get;}

        //bool IsMouseMove { get; set; }
        #endregion


        #region 方法
        /// <summary>
        /// 初始化委外商格子
        /// </summary>
        /// <param name="listGrid"></param>
        void InitialOutShopGrid(List<OutShopGrid_Info> listOutGrid,GridSubArea_Info subArea);
        void InitailShopGrid(List<ShopGrid_Info> listShopGrid, GridSubArea_Info subArea);

        /// <summary>
        /// 显示委外商格子里放入的产品信息列表,以及相应的商户/委外商的基本信息（这些都包含在grid_info实体中）
        /// </summary>
        /// <param name="listOrderInfo"></param>
        void ShowOutShopGridDetail(List<OverOrderView> listOrderInfo);
        void ShowShopGridDetail(List<OverOrderView> listDetail);

        /// <summary>
        /// 显示委外商信息
        /// </summary>
        /// <param name="shopInfo"></param>
        void ShowOutShopInfo(OutProcessShop_Info outShopInfo);
        void ShowShopInfo(Shop_Info shopInfo);

        /// <summary>
        /// 刷新某个格子(包括新增，和向已有格子增加数据)
        /// </summary>
        /// <param name="grid"></param>
        void RushOutShopGrid(OutShopGrid_Info grid);
        void RushShopGrid(ShopGrid_Info grid);

        /// <summary>
        /// 清空格子
        /// </summary>
        /// <param name="gridId"></param>
        void ClearGrid(int gridId);
        /// <summary>
        /// 清空当前选中格子
        /// </summary>
        void ClearGrid();

        /// <summary>
        /// 改变格子的背景色
        /// </summary>
        /// <param name="gridId"></param>
        /// <param name="newColor">新色</param>
        void ChangeGridColor(int gridId, Color newColor);

        /// <summary>
        /// 退出程序
        /// </summary>
        void Exit();

        /// <summary>
        /// 选择分区
        /// </summary>
        /// <param name="subAreaList"></param>
        //void SelectSubArea(List<PhotoSubarea_Info> subAreaList);

        /// <summary>
        /// 显示信息
        /// </summary>
        /// <param name="msg"></param>
        void ShowMsg(string msg);
        #endregion
    }
}
